<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>01_交集选择器</title>
    <style>
      
        .beauty {
            color: red;
        }
        .rich {
            color: skyblue;
        }
        /* 交集条件 */
        p.beauty {
            color: pink;
        }
        p.beauty#wc {
            color: gray;
        }
        /* 后来者居上 */
        p.beauty.rich {
            color: orange;
        }
    </style>
</head>
<body>
    <h2 class="rich">土豪张三</h2>
    <h2 class="beauty">明星李四</h2>
    <h2 class="rich beauty">土豪明星王五</h2>
    <hr>
    <p class="beauty" id="wc">小狗旺财</p>
    <p class="beauty">小猪佩奇</p>
</body>
</html>